#include "mainwindow.h"
#include "ui_mainwindow.h"

#include <QDockWidget>

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    QDockWidget* dockWidget = new QDockWidget("浮动窗口", this);
    this->addDockWidget(Qt::TopDockWidgetArea, dockWidget);

    dockWidget->setAllowedAreas(Qt::TopDockWidgetArea | Qt::RightDockWidgetArea);
}

MainWindow::~MainWindow()
{
    delete ui;
}

